-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permissions: More granular access and Project Access page #877
base: develop
Are you sure you want to change the base?
Permissions: More granular access and Project Access page #877
Conversation
c9d93ef
to
ed4b0ca
Compare
e6801a9
to
251a48f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…en selections exist, renamed components for consistency
…ojects list component when user lacks create project permissions
@Innders pushed the latest changes, I realized there is one issue remaining: getting the list of users involved in the selected projects only considers the first project in the selection, that's because we cannot fetch user access groups for multiple projects at once. I would gladly use another endpoint that provides said information @martastain |
The API may not allow it but we can definitely do it by looping over a single endpoint for different projects. Take a look a custom query -> https://redux-toolkit.js.org/rtk-query/usage/customizing-queries#customizing-queries-with-queryfn There are many examples in the codebase of this. ayon-frontend/src/services/userDashboard/getUserDashboard.ts Lines 240 to 269 in cface9e
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User management access
- For projects where there is no access, show greyed out in the table and sorted to the bottom.
- Tabs are jumping around, they should be calculated based on permissions and stay consistent. Project selection should make no difference.
Project Access
- Page padding
- Page title Project access
- Missing table titles
- Only show active projects
- User rows too heigh
- Add shortcut to button (Shortcut Component)
- Profile image 20px
- Top right buttons, correct labels and remove shortcut
- Context menu (I will create a mockup in figma)
- Access groups width the same as middle table and weird padding on right
- Toast not very descriptive “Operation successful”
- Can’t scroll access groups
- Resize access groups
- Block double tapping “A” (or think of shortcuts that don’t conflict)
- Shortcut needs to work when just hovering at the moment it only works once selected.
- Empty place holder shouldn’t be table item.
Filtering
- Project filtering doesn’t work
- Text search doesn’t work
- User options should not show admins, managers or services.
- User filtering doesn’t filter users in access group tables.
- If there is only once access group (from filtering or otherwise) adding should skip dialog and add them straight to that group.
- Filtering access groups should also filter options in adding modal
- Select/deselect all access groups
…ct permissions on project tab menu display
…s also, added select/deselect all button to access groups modal
The following items were implemented, the ones missing are either in progress or need more feedback/discussion: Tabs are jumping around, they should be calculated based on permissions and stay consistent. Project selection should make no difference. User options should not show admins, managers or services. |
…oject & active filters
…hortcut while in project user acess groups page
Added new features to the list: Pending issues:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Project Settings
- Add new project button is appearing when it shouldn’t. Home page and users settings page.
- Add new project button showing when user does not have permissions.
- If user does not have access at all to a project they should not see it in the list. (server issue)
- Greyed out project row not working for project settings.
- Greyed out project not visible for project access. (only works on anatomy)
- Weird loading glitch
Project access
- Border radius on panels
- Gap at the top too big.
- Gap too big between filter and titles
- Users don’t see users (are you using graphql?)
- Profile image is too big 26px not 20px.
- User rows too high, they should be 32px as per figma.
- Hover missing on edges for add button.
- Rename no access column header Username -> User
Adding/Removing
- When multiple selected, pressing A should add all.
- Add more should use shortcut A
- Add more dialog should show current groups selected
- Add more not working?
- Remove access button enabled when no user selected or non access user selected.
- Context menu, ignore dynamic menu for now. Remove all access menu icon=remove_moderator.
- Context menu, match figma text and icons.
Dialog
- Select all no background, deselect uses prim container BG. No icon.
- Item height should be 32px not 28px.
- Keyboard controls: press enter to select/unselect.
- Keyboard controls: Cmd/Ctrl + Enter to submit.
- Keyboard controls: Cmd/Ctrl + A select all (bonus if easy)
- Dialog max height 600px
Filtering
- Project options show inactive projects.
- Project text search not working.
- User options should not show admins, managers or services.
- Access Group, has value and has no value (bonus).
- Prevent adding search options more than once.
- Filters aren’t saving to user frontend preferences.
…github.com:ynput/ayon-frontend into 872-ay-5074-top-level-permissions-for-normal-users
Conditional access to project settings tabs based on user permissions
ynput/ayon-backend#389 implements user/permission endpoints that return granular project permissions. Frontend should reflect these permissions and use this object instead of relying on isManager flags.
https://experimental.ayon.dev/docs#tag/Users/operation/get_current_user_permissions
https://experimental.ayon.dev/docs#tag/Users/operation/get_current_user_project_permissions
When the user is a manager, this object is returned accordingly (with all restrictions disabled)
This should (for now) be implemented only in the project settings page
Add Users page to Project settings
Add a new sub-page to project settings that would allow non-managers (but users with
project.users
write access) to add and remove users to the project (by assigning access groups to them).username, full name, project access
.active=true
.Read only users
This requires using a new set of endpoints, more information will be provided.